package com.sky.service;


import com.sky.dto.*;
import com.sky.result.PageResult;
import com.sky.vo.*;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

@Service
public interface OrderService {

    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

   PageResult getHistoryOrders(int page, int pageSize, Integer status);

    /**
     * 根据id查询订单详情
     * @param id
     * @return
     */
    OrderVO selectOrderDetail(Long id);

    /**
     * 取消订单
     * @param id
     */
    void cancel(Long id);

    void repetition(Long id);

    PageResult page(OrdersPageQueryDTO ordersPageQueryDTO);

    OrderStatisticsVO countByStatus();

    void updateById(OrdersConfirmDTO ordersConfirmDTO);

    void rejection(OrdersRejectionDTO ordersRejectionDTO) throws Exception;

    void cancelByStatus3And4(OrdersCancelDTO ordersCancelDTO) throws Exception;

    void delivery(Long id);

    void complete(Long id);

    void reminder(Long id);

    OrderReportVO getOrderSatistics(LocalDate begin, LocalDate end);

    /**
     * 销售前10
     * @param begin
     * @param end
     * @return
     */
    SalesTop10ReportVO getSalesTop10(LocalDate begin, LocalDate end);

    // OrderVO queryDetail(Long id);
}
